package cn.edu.jmu.oelp.pojo;

import org.apache.commons.codec.net.BCodec;

/**
 * @author huanghongbe
 */

public enum RespCode {

    SUCCESS(200, "请求成功"),
    WARN(-3, "网络异常，请稍后重试"),
    LOGINSUCCESS(1,"登录成功"),
    ACCOUNTERROR(-2,"账户不存在"),
    PASSWORDERROR(-1,"密码错误"),
    ADDERROR(-4,"添加失败"),
    DELERROR(-5,"删除失败"),
    UPDATEERROR(-6,"更新失败"),
    SELERROR(-7,"查找失败"),
    USEREXIST(-202,"用户已存在"),
    REGISTSUCCESS(202,"注册成功"),
    NULLDATA(-10,"数据为空"),
    LACKDATA(-11,"参数不全"),
    LACKRELATION(-12,"不存在该数据");

    private int code;
    private String msg;

    RespCode(int code, String msg) {
        this.code=code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}